$OpenBSD: patch-common_mapi_ptr_mapi_object_ptr_h,v 1.8 2015/04/05 22:25:08 robert Exp $

On OpenBSD, _P and _U are defined in ctype.h.

--- common/mapi_ptr/mapi_object_ptr.h.orig	Thu Mar  5 16:54:04 2015
+++ common/mapi_ptr/mapi_object_ptr.h	Fri Apr  3 23:11:10 2015
@@ -129,13 +129,13 @@ class mapi_object_ptr (public)
 		std::swap(m_lpObject, other.m_lpObject);
 	}
 	
-	template<typename _U>
-	HRESULT QueryInterface(_U &refResult) {
+	template<typename _ZCPU>
+	HRESULT QueryInterface(_ZCPU &refResult) {
 		HRESULT		hr = MAPI_E_NOT_INITIALIZED;
-		typename _U::pointer	lpNewObject = NULL;
+		typename _ZCPU::pointer	lpNewObject = NULL;
 		
 		if (m_lpObject) {
-			hr = m_lpObject->QueryInterface(_U::iid, (void**)&lpNewObject);
+			hr = m_lpObject->QueryInterface(_ZCPU::iid, (void**)&lpNewObject);
 			if (hr == hrSuccess)
 				refResult.reset(lpNewObject, false);
 
@@ -157,7 +157,7 @@ class mapi_object_ptr (public)
 				if (HrGetOneProp(m_lpObject, PR_EC_OBJECT, &ptrPropValue) != hrSuccess)
 					goto exit;	// hr is still MAPI_E_INTERFACE_NOT_SUPPORTED
 
-				hr = ((IECUnknown*)ptrPropValue->Value.lpszA)->QueryInterface(_U::iid, (void**)&lpNewObject);
+				hr = ((IECUnknown*)ptrPropValue->Value.lpszA)->QueryInterface(_ZCPU::iid, (void**)&lpNewObject);
 				if (hr == hrSuccess)
 					refResult.reset(lpNewObject, false);
 			}
@@ -183,9 +183,9 @@ class mapi_object_ptr (public)
 		return m_lpObject;
 	}
 
-	template<typename _P>
-	_P as() {
-		_P ptrTmp;
+	template<typename _ZCPP>
+	_ZCPP as() {
+		_ZCPP ptrTmp;
 		QueryInterface(ptrTmp);
 		return ptrTmp;
 	}
